import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from '@STmailboxes/store/store'
import utils from '../../utils'
import validator from '../../utils/validator'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import components from '@/components/common/index'
import "@/assets/css/element-variables.scss";
import "tailwindcss/tailwind.css"
//引入阿里巴巴矢量图

// 修改 el-dialog 默认点击遮照为不关闭\全局设置点击遮罩层不关闭 Dialog
// ElementUI.Dialog.props.closeOnClickModal.default = false
//Element-UI抽屉Drawer，阻止点击遮罩层关闭
// ElementUI.Drawer.props.wrapperClosable.default = false
Vue.use(utils)
Vue.use(ElementUI)

Vue.use(components)
// productionTip 用于控制生产模式下是否显示一些开发时的提示和警告。
Vue.config.productionTip = false //阻止启动生产消息

Vue.prototype.$tenantId = '4041996532097093632'
Vue.prototype.validator = validator // 校验

// 重写路由的push方法:------------------防止多次push报错
import VueRouter from 'vue-router'
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch((err) => err)
}

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
